s = input("请输入一个字符串（只能包括字母、数字、空格）：")
res = True
if s.isspace() is False:
    mid_01 = s.replace(" ","")
    mid_02 = mid_01.lower()
    if mid_02.isalnum() is False:
        print("含有非法字符，验证失败！！！")
    else:
        begin = 0
        end = len(mid_02) - 1
        while begin < end:
            if mid_02[begin] != mid_02[end]:
                res = False
                break
            begin += 1
            end -= 1
        print(res)
else:
    print(res)